#!/usr/bin/env python
import pymongo

def test_mongo():
    connect = pymongo.Connection('127.0.0.1', 27017)
    db = connect.test
    tb = db.classmember5
    m1 = {'name':'mingmings', 'age':18, 'job':'nihao'}
    tb.insert(m1)

    for i in tb.find({}):
        print i
    

if __name__ == '__main__':
    test_mongo()
